<template>
  <svg class="icon proto-icon"  aria-hidden="true">
    <use :xlink:href="iconName" />
  </svg>
</template>
<script>
export default {
  name: 'icon',
  props: {
    name: {
      type: String,
      default: function() {
        return 'icon-morentu'
      }
    }
  },
  computed: {
    iconName: function() {
      if (this.name.indexOf('icon-') > -1) {
        return '#' + this.name
      } else {
        return '#icon-' + this.name
      }
    }
  }
}
</script>
<style type="text/css">
.icon {
  width: 18px;
  height: 18px;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}
</style>